<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="box">
      <p>p1</p>
      <p>p2</p>
      <p>p3</p>
    </div>
    <script>
      const box = document.getElementById("box");
      setTimeout(() => {
        // box.insertAdjacentHTML("beforeend", "<b>hello jack</b>"); //append innerHTML
        box.insertAdjacentText("beforeend", "<b>hello jack</b>"); //append textContent
        // ul.insertAdjacentElement("afterbegin", li); //perpend
        // ul.insertAdjacentElement("afterend", li); //after
        // ul.insertAdjacentElement("beforebegin", li); //brefor
      }, 3000);
    </script>
  </body>
</html>
